<template>
  <div class="template-form-Lu">
    <a-modal
      title="审评专家评价"
      :visible="handleModalVisible"
      :maskClosable="false"
      :closable="true"
      :destroyOnClose="true"
      width="100%"
      :dialog-style="{ margin: '0 auto' }"
      wrapClassName="dailyEvaluation-handleModal-Lu"
      @cancel="closeVisible">
      <template slot="footer">
      </template>
      <div v-if="isHuView && isView && !isBlyj" style="text-align: right;">
        <a-button v-print="printObj" class="blue-btn">打印</a-button>
      </div>
      <!-- 打印的div里的样式不能包在打印的div父级样式里，否则不生效 -->
      <div style="max-width: 1350px;margin: 0 auto;">
        <div id="printTest" v-if="handleModalVisible && hjmc == '经办人审核' && !isView ">
          <h1 class="dailyEvaluation-title">审评专家评价</h1>
          <table border="1" cellspacing="0" class="dailyEvaluation-table-Lu psgzsh-table" :key="tableKey" style="text-align: center;">
            <tr>
              <th colspan="2">事项名称</th>
              <td colspan="3">{{ tableData.fsxmc }}</td>
              <th style="width: 170px !important">受理编号</th>
              <td colspan="3">{{ tableData.fslbh }}</td>
            </tr>
            <tr>
              <th colspan="2">企业名称</th>
              <td colspan="3">{{ tableData.fqymc }}</td>
              <th style="width: 170px !important">审评范围</th>
              <td colspan="3">{{ tableData.fcyjcfw }}</td>
            </tr>
            <tr>
              <th colspan="2">审评类型</th>
              <td colspan="3">{{ tableData.fjclx }}</td>
              <th style="width: 170px !important">技术审评时间</th>
              <td colspan="3">{{ tableData.fcykssj }} - {{ tableData.fcyjssj }}</td>
            </tr>
            <!-- </table>
            <div v-if="huViewItemList.length > 0" class="selectPrudently-tabs-card-edit-box" style="margin-top: 10px;">
              <h2>审评员互评</h2>
              <a-tabs v-if="huViewItemList" type="card" v-model:activeKey="activeKey" @change="activeChange">
                  <a-tab-pane :key="index" :tab="item.fpjrxm"  v-for="(item,index) in huViewItemList"></a-tab-pane>
              </a-tabs>
            </div>
            <div v-if="huViewItemList.length > 0" style="border: 1px solid #38f;border-top: none;padding: 10px;margin-top: -16px;margin-bottom: 10px;">
              <table border="1" cellspacing="0" class="dailyEvaluation-table-Lu psgzsh-table" :key="tableKey" style="text-align: center;"> -->
                <tr>
                  <td colspan="9" style="line-height: 1;padding-top: 7px;">
                    <span style="font-size: 20px;">审评员互评</span>
                    <a-tabs v-if="huViewItemList" type="card" v-model:activeKey="activeKey" @change="activeChange">
                        <a-tab-pane :key="index" :tab="item.fpjrxm"  v-for="(item,index) in huViewItemList"></a-tab-pane>
                    </a-tabs>
                  </td>
                </tr>
                <tr class="itemList-tr">
                  <th>评价人</th>
                  <th>被评价人</th>
                  <th>廉洁自律情况</th>
                  <th>严格按方案进行技术审评</th>
                  <th>能发现所负责的职责范围内存在的缺陷情况</th>
                  <th style="width: 170px !important">技术审评报告涵盖全部发现问题，缺陷描述清晰、 具体，按风险评定原则对缺陷分级且科学合理</th>
                  <th>技术审评作业（或笔录）清晰、可追审评过程，能与审评报告中发现的问题和现场情况相对应</th>
                  <th>综合评价</th>
                  <th>备注</th>
                </tr>

                <tr v-for="(item,indexa) in huViewItemList[huViewItemKey].bpjList" :key="indexa">
                  <td>{{ item.fpjrxm }}({{ item.fpjrzg }})</td>
                  <td v-if="indexa == 0" :rowspan="huViewItemList[huViewItemKey].bpjList.length">{{ item.fbpjrxm }}({{ item.fbpjrzg }})</td>
                  <td>{{ item.fljzlqk }}</td>
                  <td>{{ item.fzdjcqd }}</td>
                  <td>{{ item.fhdqxqk }}</td>
                  <td>{{ item.fxcjcqxfj }}</td>
                  <td>{{ item.fxcjczy }}</td>
                  <td>{{ item.fzhpj }}</td>
                  <td>{{ item.fkpbz }}</td>
                </tr>

                <tr>
                  <td colspan="9" style="height: 41px;">
                    <span style="font-size: 20px;">经办人评价</span>
                  </td>
                </tr>
              <!-- </table>
            </div>
            <div v-else style="padding: 10px;">
              当前暂无互评数据!
            </div>
            <table border="1" cellspacing="0" class="dailyEvaluation-table-Lu psgzsh-table" :key="tableKey" style="text-align: center;"> -->
            <tr class="itemList-tr">
              <th>评价人</th>
              <th>审评组成员</th>
              <th>廉洁自律情况</th>
              <th>严格按方案进行技术审评</th>
              <th>能发现所负责的职责范围内存在的缺陷情况</th>
              <th style="width: 170px !important">技术审评报告涵盖全部发现问题，缺陷描述清晰、 具体，按风险评定原则对缺陷分级且科学合理</th>
              <th>技术审评作业（或笔录）清晰、可追审评过程，能与审评报告中发现的问题和现场情况相对应</th>
              <th>综合评价</th>
              <th>备注</th>
              <th v-if="!isHuView && !isView">操作</th>
            </tr>
            <!-- 互评查看 -->
            <!--  -->
            <tr v-for="(item,index) in itemManList" :key="index" class="itemList-tr">
              <td v-if="index == 0" :rowspan="itemManList.length">
                中心经办人
              </td>
              <td>
                {{ item.fjcyxm }}({{ item.fssk }})
                <a-button class="blue-btn" @click="viewPj(item)">查看互评</a-button>
              </td>
              <td>
                <a-radio-group
                  v-if="!isView"
                  :name="item.fjcyxm"
                  :value="item.fljzlqk ? item.fljzlqk : ''"
                  @change="checkChange($event.target.value, 'fljzlqk', item)"
                  :options="checkArray"
                />
                <span v-else>{{ item.fljzlqk }}</span>
              </td>
              <td>
                <a-radio-group
                  v-if="!isView"
                  :value="item.fzdjcqd ? item.fzdjcqd : ''"
                  @change="checkChange($event.target.value, 'fzdjcqd', item)"
                  :options="checkArray"
                />
                <span v-else>{{ item.fzdjcqd }}</span>
              </td>
              <td>
                <a-radio-group
                  v-if="!isView"
                  :value="item.fhdqxqk ? item.fhdqxqk : ''"
                  @change="checkChange($event.target.value, 'fhdqxqk', item)"
                  :options="checkArray"
                />
                <span v-else>{{ item.fhdqxqk }}</span>
              </td>
              <td>
                <a-radio-group
                  v-if="!isView"
                  :value="item.fxcjcqxfj ? item.fxcjcqxfj : ''"
                  @change="checkChange($event.target.value, 'fxcjcqxfj', item)"
                  :options="checkArray"
                />
                <span v-else>{{ item.fxcjcqxfj }}</span>
              </td>
              <td>
                <a-radio-group
                  v-if="!isView"
                  :value="item.fxcjczy ? item.fxcjczy : ''"
                  @change="checkChange($event.target.value, 'fxcjczy', item)"
                  :options="checkArray"
                />
                <span v-else>{{ item.fxcjczy }}</span>
              </td>
              <td>
                <a-radio-group
                  v-if="!isView"
                  :value="item.fzhpj ? item.fzhpj : ''"
                  @change="checkChange($event.target.value, 'fzhpj', item)"
                  :options="checkArray"
                />
                <span v-else>{{ item.fzhpj }}</span>
              </td>
              <td>
                <a-textarea
                  v-if="!isView"
                  :value="item.fkpbz ? item.fkpbz : ''"
                  placeholder="请输入备注:"
                  v-model="item.fkpbz"
                  @blur="inputHuChange($event.target.value, 'fkpbz', item)"
                  :auto-size="{ minRows: 3}"/>
                <span v-else>{{ item.fkpbz }}</span>
              </td>
              <td v-if="!isHuView && !isView" style="display: inline;">
                <a-button class="blue-btn" @click="allExcellent(item.id)">一键优秀</a-button>
                <a-button class="blue-btn" @click="allEmpty(item.id)">一键清空</a-button>
              </td>
            </tr>
            <tr v-if="isBlyj">
              <th>办理意见</th>
              <td colspan="8">
                <a-textarea
                  v-model="blyj"
                  placeholder="办理意见:"
                  :auto-size="{ minRows: 3}"/>
              </td>
            </tr>
          </table>
          <div v-if="isHuView && isView && !isBlyj" style="display: flex;justify-content: space-around;font-size: 16px;margin: 10px;">
            <span>评价人：
              <img v-if="getUrl('frckpdshblr')" :src="getUrl('frckpdshblr')" class="yjqmImg"/>
              <span v-else>{{ tableData.frckpdshblr }}</span>
            </span>
            <span>复核人：
              <img v-if="getUrl('frckpdfhblr')" :src="getUrl('frckpdfhblr')" class="yjqmImg"/>
              <span v-else>{{ tableData.frckpdfhblr }}</span>
            </span>
          </div>
          <div style="display: flex;padding-left: 10px;">
            <div>填表说明：</div>
            <div>
              1.本表由中心各科人员在每次审评后对审评组成员进行考评。<br/>
              2.综合评价判定原则为：档次占比超过50%的，本次综合评价按该档次进行评定。
            </div>
          </div>
        </div>
        <div id="printTest" v-else>
          <h1 class="dailyEvaluation-title">审评专家评价</h1>
          <table border="1" cellspacing="0" class="dailyEvaluation-table-Lu psgzsh-table" :key="tableKey" style="text-align: center;">
            <tr>
              <th colspan="2">事项名称</th>
              <td colspan="3">{{ tableData.fsxmc }}</td>
              <th style="width: 170px !important">受理编号</th>
              <td colspan="3">{{ tableData.fslbh }}</td>
            </tr>
            <tr>
              <th colspan="2">企业名称</th>
              <td colspan="3">{{ tableData.fqymc }}</td>
              <th style="width: 170px !important">审评范围</th>
              <td colspan="3">{{ tableData.fcyjcfw }}</td>
            </tr>
            <tr>
              <th colspan="2">审评类型</th>
              <td colspan="3">{{ tableData.fjclx }}</td>
              <th style="width: 170px !important">技术审评时间</th>
              <td colspan="3">{{ tableData.fcykssj }} - {{ tableData.fcyjssj }}</td>
            </tr>
            <tr class="itemList-tr">
              <th>评价人</th>
              <th>审评组成员</th>
              <th>廉洁自律情况</th>
              <th>严格按方案进行技术审评</th>
              <th>能发现所负责的职责范围内存在的缺陷情况</th>
              <th style="width: 170px !important">技术审评报告涵盖全部发现问题，缺陷描述清晰、 具体，按风险评定原则对缺陷分级且科学合理</th>
              <th>技术审评作业（或笔录）清晰、可追审评过程，能与审评报告中发现的问题和现场情况相对应</th>
              <th>综合评价</th>
              <th>备注</th>
              <th v-if="!isHuView && !isView">操作</th>
            </tr>
            <!-- 互评查看 -->
            <tr v-if="isHuView && isView && !isBlyj" v-for="(item,index) in myHuViewItemList" :key="index + new Date().getTime()" id="myHuDiv" class="itemList-tr ">
              <td v-if="index == 0" :rowspan="myHuViewItemList.length">
                {{item.fpjrzg}}({{ item.fpjrxm }})
                {{ index }}
              </td>
              <td v-if="item.id">
                {{ item.fbpjrxm }}({{ item.fbpjrzg }})
              </td>
              <td  v-if="item.id">
                <span>{{ item.fljzlqk }}</span>
              </td>
              <td  v-if="item.id">
                <span>{{ item.fzdjcqd }}</span>
              </td>
              <td  v-if="item.id">
                <span>{{ item.fhdqxqk }}</span>
              </td>
              <td  v-if="item.id">
                <span>{{ item.fxcjcqxfj }}</span>
              </td>
              <td  v-if="item.id">
                <span>{{ item.fxcjczy }}</span>
              </td>
              <td  v-if="item.id">
                <span>{{ item.fzhpj }}</span>
              </td>
              <td  v-if="item.id">
                <span>{{ item.fkpbz }}</span>
              </td>
            </tr>
            <!--  -->
            <tr v-for="(item,index) in itemManList" :key="index" class="itemList-tr">
              <td v-if="index == 0" :rowspan="itemManList.length">
                中心经办人
                {{ index }}
              </td>
              <td>
                {{ item.fjcyxm }}({{ item.fssk }})
              </td>
              <td>
                <a-radio-group
                  v-if="!isView"
                  :name="item.fjcyxm"
                  :value="item.fljzlqk ? item.fljzlqk : ''"
                  @change="checkChange($event.target.value, 'fljzlqk', item)"
                  :options="checkArray"
                />
                <span v-else>{{ item.fljzlqk }}</span>
              </td>
              <td>
                <a-radio-group
                  v-if="!isView"
                  :value="item.fzdjcqd ? item.fzdjcqd : ''"
                  @change="checkChange($event.target.value, 'fzdjcqd', item)"
                  :options="checkArray"
                />
                <span v-else>{{ item.fzdjcqd }}</span>
              </td>
              <td>
                <a-radio-group
                  v-if="!isView"
                  :value="item.fhdqxqk ? item.fhdqxqk : ''"
                  @change="checkChange($event.target.value, 'fhdqxqk', item)"
                  :options="checkArray"
                />
                <span v-else>{{ item.fhdqxqk }}</span>
              </td>
              <td>
                <a-radio-group
                  v-if="!isView"
                  :value="item.fxcjcqxfj ? item.fxcjcqxfj : ''"
                  @change="checkChange($event.target.value, 'fxcjcqxfj', item)"
                  :options="checkArray"
                />
                <span v-else>{{ item.fxcjcqxfj }}</span>
              </td>
              <td>
                <a-radio-group
                  v-if="!isView"
                  :value="item.fxcjczy ? item.fxcjczy : ''"
                  @change="checkChange($event.target.value, 'fxcjczy', item)"
                  :options="checkArray"
                />
                <span v-else>{{ item.fxcjczy }}</span>
              </td>
              <td>
                <a-radio-group
                  v-if="!isView"
                  :value="item.fzhpj ? item.fzhpj : ''"
                  @change="checkChange($event.target.value, 'fzhpj', item)"
                  :options="checkArray"
                />
                <span v-else>{{ item.fzhpj }}</span>
              </td>
              <td>
                <a-textarea
                  v-if="!isView"
                  :value="item.fkpbz ? item.fkpbz : ''"
                  placeholder="请输入备注:"
                  v-model="item.fkpbz"
                  @blur="inputHuChange($event.target.value, 'fkpbz', item)"
                  :auto-size="{ minRows: 3}"/>
                <span v-else>{{ item.fkpbz }}</span>
              </td>
              <td v-if="!isHuView && !isView" style="display: inline;">
                <a-button class="blue-btn" @click="allExcellent(item.id)">一键优秀</a-button>
                <a-button class="blue-btn" @click="allEmpty(item.id)">一键清空</a-button>
              </td>
            </tr>
            <tr v-if="isBlyj">
              <th>办理意见</th>
              <td colspan="8">
                <a-textarea
                  v-model="blyj"
                  placeholder="办理意见:"
                  :auto-size="{ minRows: 3}"/>
              </td>
            </tr>
          </table>
          <div v-if="isHuView && isView && !isBlyj" style="display: flex;justify-content: space-around;font-size: 16px;margin: 10px;">
            <span>评价人：
              <img v-if="getUrl('frckpdshblr')" :src="getUrl('frckpdshblr')" class="yjqmImg"/>
              <span v-else>{{ tableData.frckpdshblr }}</span>
            </span>
            <span>复核人：
              <img v-if="getUrl('frckpdfhblr')" :src="getUrl('frckpdfhblr')" class="yjqmImg"/>
              <span v-else>{{ tableData.frckpdfhblr }}</span>
            </span>
          </div>
          <div style="display: flex;padding-left: 10px;">
            <div>填表说明：</div>
            <div>
              1.本表由中心各科人员在每次审评后对审评组成员进行考评。<br/>
              2.综合评价判定原则为：档次占比超过50%的，本次综合评价按该档次进行评定。
            </div>
          </div>
        </div>
      </div>
      <div v-if="!isHuView || !isView || isBlyj" style="display: flex;justify-content: space-around;margin-top: 50px;font-size: 16px;">
        <div>
          <span v-if="dbr">待办人：{{ dbr }}</span>
        </div>
        <div>
          <span>短信通知：<a-checkbox v-model="isMsm"></a-checkbox></span><br/>
          <span>下一环节：{{ nextHj }}</span>
        </div>
      </div>
      <template slot="footer">
        <div v-if="isView && !isBlyj">
          <a-button @click="closeVisible">关闭</a-button>
        </div>
        <div v-if="!isView || isBlyj">
          <a-button class="blue-btn" @click="returnClick">
            退回
          </a-button>
          <a-button :loading="loading" class="blue-btn" @click="saveTable">
            提交
          </a-button>
        </div>
      </template>
    </a-modal>
  </div>
</template>
<script>
import { queryJobByJobId,queryAllJcyHpjlList,xpHcyPjToOneExcellent,xpHcyPjToEmpty,queryXpHcy,xpHcyPj,
          submitFlow,downMyQm,returnUpperFlowJob,queryPjrJcyHpjlList} from './service/index'
export default {
  data() {
    return {
      handleModalVisible: false,
      tableKey: '',
      hjmc: '',
      tableData: {},
      itemManList : [],
      checkArray: [
        { label: "优秀", value: "优秀" },
        { label: "合格", value: "合格" },
        { label: "不合格", value: "不合格" },
      ],
      radioStyle: {
        display: 'block',
        height: '30px',
        lineHeight: '30px',
      },
      printObj:{
        id:"printTest", //需要打印的id名称
        popTitle:"审评专家评价",//文档的名称
        // preview:true,//预览功能，不好用
        zIndex:'20002',
        beforeOpenCallback(vue){
            // //console.log('打印回调',vue)
        },
        openCallback (vue) {//打开之前
            // //console.log('打开之前',vue)
        },
        closeCallback (vue) {//关闭了打印工具
            // //console.log('关闭了打印工具')
        },
      },
      isView: false,
      isHuView: false,
      huViewItemList: [],
      myHuViewItemList: [],
      huViewItemKey: 0,
      huViewItemListKey: '',
      jobId: '',
      loading: false,
      blyj: '',
      isBlyj: false,
      imgList: [
        {rName:'frckpdshblr',url: ''},
        {rName:'frckpdfhblr',url: ''},
      ],
      TimeId: -1,
      jobId: '',
      isMsm: false,
      dbr: '',
      nextHj: '',
      activeKey: 0,
    }
  },
  methods: {
    getData(val,isHuView,isView){
      //console.log(val)
      this.isHuView = isHuView
      this.isView = isView
      if(val.jobid){
        // 查询当前流程任务详情-通过当前流程任务id
        this.jobId = val.jobid
        queryJobByJobId({jobid: val.jobid}).then(res => {
          //console.log(res)
          this.hjmc = res.result.job.fhjmc
          this.tableData = res.result.sqsx
          //console.log(res.result.nextNodeDbrList)
          this.dbr = res.result.nextNodeDbrList.length > 0?res.result.nextNodeDbrList[0].dbr + '/' + res.result.nextNodeDbrList[1].dbr:null
          this.nextHj = res.result.nextNode
          //console.log(this.dbr,this.nextHj)
          this.qmImg('frckpdshblr',this.tableData.frckpdshblrid)
          this.qmImg('frckpdfhblr',this.tableData.frckpdfhblrid)
        })
        // 查询所有的审评员互评记录
        queryAllJcyHpjlList({sqsxid: val.sqsxid}).then(res => {
          //console.log(res)
          this.huViewItemList = []
          // res.result.forEach(item => {
          //   this.huViewItemList.push(item,...item.bpjList)
          // })
          this.huViewItemList = res.result
          this.huViewItemKey = 0
          //console.log('this.huViewItemList',this.huViewItemList)
        })
        queryPjrJcyHpjlList({sqsxid: val.sqsxid}).then(res => {
          //console.log(res)
          this.myHuViewItemList = []
          this.myHuViewItemList = res.result
        })
        // 刷新选派人员评价
        queryXpHcy({sqsxid: val.sqsxid}).then(res => {
          //console.log(res)
          this.itemManList = []
          this.itemManList = res.result.cyxpjlList
        })
      }
    },
    qmImg(name,ids){
      //console.log(name,ids)
      downMyQm({id:ids}).then(resa => {
        // //console.log(resa)
        // if(resa.code == 200){
          const cyxp = this.imgList;
          const target = cyxp.find((c) => c.rName == name);
          if(resa.code){
            if (target) {
              target['url'] = null
            }
          } else {
            if (target) {
              target['url'] = "data:image/png;base64," +
              btoa( new Uint8Array(resa).reduce( (data, byte) => data + String.fromCharCode(byte), "" ))
            }
          }
        // }
      })
    },
    getUrl(ids){
      let url = ''
      this.imgList.forEach(item => {
          if(item.rName == ids){
          url = item.url
          }
      })
      return url
    },
    viewPj(val){
      this.huViewItemList.forEach((item,index) => {
        if(val.fjcyxm == item.fpjrxm){
          this.activeChange(index)
        }
      })
    },
    // 请求回显
    async refreshCheck() {
      const res = await queryXpHcy({sqsxid:this.tableData.id});
      if (res.success) {
        this.itemManList = []
        this.itemManList = res.result.cyxpjlList
      } else {
        this.$message.warning(res.message)
      }
    },
    async checkChange(value, prototype, row){
      const cyxp = this.itemManList;
      const target = cyxp.find((c) => c.id == row.id);
      if (target) {
        target[prototype] = value;
      }
      this.itemManList = cyxp;

      const obj = {};
      obj[prototype] = value;
      obj["id"] = row.id;
      //console.log(this.itemManList)
      //console.log(obj)
      const res = await xpHcyPj(obj);
      if (res.success) {
        // this.$message.success(res.message)
        this.refreshCheck();
      }
    },
    inputHuChange(value, prototype, row){
    //     //console.log('row',row)
    //   clearTimeout(this.TimeId)
    //   this.TimeId = setTimeout(async () => {
    //       // 定时器生效时执行的方法
    //       const cyxp = this.itemManList;
    //       const target = cyxp.find((c) => c.id == row.id);
    //       if (target) {
    //         target[prototype] = value;
    //       }
    //       this.itemManList = cyxp;

    //       const obj = {};
    //       obj[prototype] = value;
    //       obj["id"] = row.id;
    //       //console.log(this.itemManList)
    //       //console.log('obj',obj)
    //       const res = await xpHcyPj(obj);
    //       if (res.success) {
    //         this.$message.success(res.message)
    //         this.refreshHuCheck();
    //       }
    //     }, 2000)
        let data = {
            id: row.id,
            fkpbz: row.fkpbz
        }
        xpHcyPj(data).then(res => {
            if (res.success) {
                this.$message.success(res.message)
                this.refreshCheck();
            }
        })
    },
    activeChange(key){
      this.huViewItemKey = Number(key)
      this.activeKey = Number(key)
    },
    // 一键优秀
    allExcellent(ids){
      xpHcyPjToOneExcellent({id:ids}).then(res => {
        if(res.success){
          this.$message.success(res.message)
          this.refreshCheck();
        } else {
          this.$message.warning(res.message)
        }
      })
    },
    // 一键清空
    allEmpty(ids){
      xpHcyPjToEmpty({id:ids}).then(res => {
        if(res.success){
          this.$message.success(res.message)
          this.refreshCheck();
        } else {
          this.$message.warning(res.message)
        }
      })
    },
    saveTable(){
      let data = {
        jobid: this.jobId,
        fblyj: this.blyj,
        smgflag: this.isMsm?'是':''
      }
      var that = this
      that.$confirm({
        title: '您确定要提交吗?',
        content: '',
        okText: '确定',
        okType: 'info',
        cancelText: '取消',
        onOk() {
          //console.log(data)
          that.loading = true
          submitFlow(data).then(res => {
            if(res.success){
              that.$message.success(res.message)
              that.closeVisible()
            } else {
              that.$message.warning(res.message)
            }
            that.loading = false
          })
        },
        onCancel() {
          //console.log('Cancel');
        },
      });
    },
    returnClick(){
      if(!this.blyj.length){
        this.$message.warning('退回前请先填写退回意见。')
        return
      }
      var that = this
      that.$confirm({
        title: '您确定要退回吗?',
        content: '',
        okText: '确定',
        okType: 'danger',
        cancelText: '取消',
        onOk() {
          let data = {
            jobid: that.jobId,
            opinion: that.blyj,
          }
          returnUpperFlowJob(data).then(res => {
            if(res.success){
              that.$message.success(res.message)
              that.closeVisible()
            } else {
              that.$message.warning(res.message)
            }
          })
        },
        onCancel() {
          //console.log('Cancel');
        },
      });
    },
    closeVisible(){
      this.handleModalVisible = false
      this.isBlyj = false
      this.isMsm = false
      this.huViewItemList = []
      this.activeKey = 0
      this.huViewItemKey = 0
      this.$emit('success')
    }
  },
}
</script>
<style lang="less">
  /*在CSS中定义打印样式*/
  @media print {
    #myHuDiv {
      display: none;
    }
  }
.dailyEvaluation-handleModal-Lu {
    span {
        word-wrap:break-word;
        word-break:break-all;
        // white-space:normal;
    }
    p {
        word-wrap:break-word;
        word-break:break-all;
        white-space:normal;
    }
  .ant-modal {
    background-color: #5ca3e5;
    position: static;
    width: 100%;
    height: 100%;
    top: 0 !important;
    padding-bottom: 0 !important;
    margin: 0 auto !important;
  }
  .ant-modal-content {
    height: 100%;
  }
  .ant-modal-body {
    height: calc(100vh - 108px);
    overflow: scroll;
  }
  .ant-modal-footer {
    text-align: center !important;
    .ant-btn-primary {
      background-color: #5ca3e5 !important;
      border-color: #5ca3e5 !important;
    }
  }
  .ant-form-item {
    margin-bottom: 0px;
    textarea.ant-input {
        margin-bottom: 0px;
        height: 46px;
    }
  }
  .ant-tabs.ant-tabs-card {
    .ant-tabs-tab {
      font-size: 16px;
      height: 30px !important;
      line-height: 30px !important;
    }
    .ant-tabs-bar .ant-tabs-tab-active {
        margin-bottom: 0px !important;
        background: #5ca3e5 !important;
        border-color: #5ca3e5 !important;
        color: #fff;
        font-size: 16px;
    }
    .ant-tabs-nav-container{
        height: 32px !important;
        // border-bottom: 1px solid #5ca3e5;
    }
  }
  //-----------
  .print-div-heng {
    // width: 1123px;
    // height: 794px;
    // margin: 0 auto;
    // margin-left: 14%;
    .title {
      text-align: center;
    }
  }

  .psgzsh-table {
    th {
      min-width: 130px;
    }
  }
  .ant-tabs {
    text-align: left !important;
  }
  .ant-tabs-bar {
    margin: 0 !important;
  }
}
.dailyEvaluation-title {
  text-align: center;
}
.dailyEvaluation-table-Lu{
    // width: 80%;
    margin: 0 auto;
    // margin-top: 4mm;
    font-size: 16px;
    th {
      text-align: center;
      font-size: 16px;
      line-height: 2.5;
      padding: 0px;
    }
    td {
      min-width: 150px;
      text-align: center;
      line-height: 2.5;
      color: black;
      padding: 0px;
      font-size: 16px;
      // font-weight: 600;
      font-family: 'SimSun';
      word-wrap:break-word;
      word-break:break-all;
      white-space:normal;
    }
    .ant-input {
      font-weight: 600;
      // height: 63px;
      max-height: none;
    }
  //   .ant-input:placeholder-shown {
  //     height: 63px;
  //     max-height: none;
  //   }
      form .ant-mentions, form textarea.ant-input {
          margin-bottom: 0px;
          height: 46px;
      }
      // form textarea.ant-input {
      //     margin-bottom: 0px;
      // }
    .ant-input-group.ant-input-group-compact .ant-input {
      // height: 63px;
      max-height: none;
    }
    .ant-upload-list {
      display: none;
    }
    p {
      margin-left: 10px;
      margin-right: 10px;
    }
    .itemList-tr {
      th {
        line-height: 1.2;
        padding: 5px;
      }
      td {
        .ant-radio-group {
          text-align: left;
          .ant-radio-wrapper {
            display: block;
            padding-left: 30px;
          }
        }
      }
      td:first-child {
        text-align: center;
        padding: 0%;
      }

    }
    .yjqmImg {
      width: 100px;
      height: 30px;
      padding-right: 20px;
    }
  }
</style>
